<?php

/**
 * @file
 * Sample protected resource.
 *
 * Obviously not production-ready code, just simple and to the point.
 *
 * In reality, you'd probably use a nifty framework to handle most of the crud for you.
 */

require "lib/PDOOAuth2.php";
require "../lib/Access.php";

$oauth = new PDOOAuth2();
$accessHandler = new OAuth2\Example\Server\Access\Handler($oauth);

$result = $accessHandler->handleAccessRequest();
echo json_encode(array('hello' => 'world', 'access' => $result));
